November 30, 2008
Three 1K Story Generators
To follow up on the 1K story generator I posted ten days ago, here is a slightly revised version of that generator and two new ones.
- story1.py – Story generation by elision. This is a slightly modified version of the November 20 “original.” It uses a sequence of (specially written) sentences; all but 5-9 sentences are removed and the remaining text is presented as the story.
- story2.py – Story generation by segments. This chooses a beginning, middle, and end. A sentence is chosen from a pool of beginnings. A middle is generated by joining “He” or “She” to a verb or other middle section and concluding that with “he” or “she.” Then, an ending is chosen from a pool of endings. This was inspired by some of Nanette Wylde’s minimal and clever programs, such as Storyland and about so many things.
- story3.py – Story generation by elision & addition. This, like story1.py, uses a sequence of (specially written) sentences; all but 5-8 sentences are removed. These sentences were written by Beth Cardier. After each of these 5-8 sentences is printed, an “atmospheric” text is, with 50% probability, removed from an unordered pool and printed.
On a Mac or Linux system, you can run one of these, for instance, story2.py, by downloading it to the Desktop, opening a terminal Window, typing “cd Desktop”, and typing “python story2.py”. These run on Windows, too, but you will need to have Python installed, either by having already installed it or by installing it (e.g., version 2.6) yourself
January 8th, 2009 at 11:15 pm
These are really neat. While looking at the source code of the first one, I noticed that the sequence has an intentional arrangement to it but I also wondered what you meant by specifically written sentences. Did you have any guidelines you would give to anyone interested in writing their own text for something like this?
January 12th, 2009 at 12:20 am
Elliot, sure – I just meant that I didn’t simply write a 23-sentence story, but has in mind that each sentence had to be optional. Rather than offering guidelines, I’d suggest that people take a few minutes and try writing a story generator of this sort. (You’re all welcome to post them here, too.) People will probably quickly come up with better methods than I could suggest.
June 24th, 2009 at 8:15 am
Here are Excerpts from the Chronicles of Pookie & JR based on the above story1.py: http://luckysoap.com/lapsuslinguae/2009/06/excerpts-from-chronicles-of-pookie-jr.html
July 10th, 2009 at 6:05 pm
[…] Cape, and other fine works of e-lit, print and xerography, has delightfully repurposed one of my 1k story generators to have it tell stories involving her and a hermit crab named Pookie. The program has grown to […]
July 15th, 2009 at 4:46 pm
The saga continues. NYC based artist/programmer Ravi Rajakumar has ported the Chronicles of Pookie & JR to Javascript. Rajakumar notes that in javascript the whole thing ends up being about 11k with the css and html, and not including the jQuery includes, but the actual core bit of js is still around 2k. http://luckysoap.com/pookieandjr
December 14th, 2009 at 7:32 am
First year Dartington College Performance Writing students group blog remixed using the above story1.py script to create Darting Stories Remix: http://luckysoap.com/lapsuslinguae/2009/12/darting-stories-remix.html
January 13th, 2010 at 8:44 am
[…] , de Serge Bouchardon. La version anglaise était auparavant disponible en Python. C’était le second de trois générateurs de 1k que j’avais réalisés à la fin de 2008. “Les deux” génère des histoires toutes […]